# 负责整个项目的配置信息


class Config:
    # 配置数据库和SQLAlchemy
    HOST = 'localhost'
    PORT = '3306'
    DATABASE = 'test'
    USERNAME = 'root'
    PASSWORD = '123456'
    DB_URL = f'mysql+pymysql://{USERNAME}:{PASSWORD}@{HOST}:{PORT}/{DATABASE}?charset=utf8mb4'

    SQLALCHEMY_DATABASE_URL = DB_URL
    # 是否追踪数据库中的修改
    SQLALCHEMY_TRACK_MODIFICATIONS = False


# 开发环境下配置信息
class Dev_Config(Config):
    DEBUG = True
    SQLALCHEMY_ECHO = True  # 打印sql语句


# 生产环境下的配置信息
class Pro_Config(Config):
    pass



